package day09_20210512;

public class ErrorTest {
    public static void main(String[] args) {
        //1、栈溢出：Exception in thread "main" java.lang.StackOverflowError
     //   main(args);//内存溢出

        //2、堆溢出：Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        //Integer[] arr = new Integer[1024*1024*1024];

        try{
            System.out.println(70/0);
        }catch (Exception e){
            System.out.println("10/0有异常");
            int i = 10/0;
        }finally {
            System.out.println("执行finally里面的语句了");
        }
        System.out.println("最后还会执行吗");
    }
}
